Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

full support for JDK21 via scalameta 4.8.13 #1810

Merged
merged 1 commit into from
Nov 10, 2023
Merged

Conversation

bjaglin
Copy link
Collaborator

@bjaglin bjaglin commented Jul 4, 2023

No description provided.

@bjaglin bjaglin mentioned this pull request Jul 4, 2023
@bjaglin bjaglin force-pushed the jdk21 branch 2 times, most recently from 8b9a886 to 9220df4 Compare September 9, 2023 19:04
@bjaglin bjaglin changed the title compatibility with JDK21 (upcoming LTS) compatibility with JDK21 Oct 28, 2023
@bjaglin
Copy link
Collaborator Author

bjaglin commented Oct 28, 2023

Regressions seem to be related to looking up JDK symbols from class files with scalameta, specifically:

scala.meta.internal.symtab.GlobalSymbolTable(scala.meta.Classpath(Nil), true).info("java/lang/System#lineSeparator().")
scala.meta.internal.symtab.GlobalSymbolTable(scala.meta.Classpath(Nil), true).info("java/nio/file/LinkOption#NOFOLLOW_LINKS.")
java.lang.NullPointerException: Cannot invoke "String.isEmpty()" because "$this" is null
  at scala.collection.StringOps$.head$extension(StringOps.scala:1124)
  at scala.meta.internal.semanticdb.Scala$Names$.encode(Scala.scala:181)
  at scala.meta.internal.semanticdb.Scala$Descriptor.toString(Scala.scala:147)
  at scala.meta.internal.semanticdb.Scala$Descriptor.toString$(Scala.scala:140)
  at scala.meta.internal.semanticdb.Scala$Descriptor$Parameter.toString(Scala.scala:158)
  at scala.meta.internal.semanticdb.Scala$Symbols$.Global(Scala.scala:14)
  at scala.meta.internal.javacp.Javacp$.$anonfun$sinfos$13(Javacp.scala:175)
  at scala.collection.immutable.List.map(List.scala:246)
  at scala.meta.internal.javacp.Javacp$.$anonfun$sinfos$9(Javacp.scala:169)
  at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:576)
  at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:574)
  at scala.collection.AbstractIterable.foreach(Iterable.scala:933)
  at scala.meta.internal.javacp.Javacp$.sinfos(Javacp.scala:135)
  at scala.meta.internal.javacp.Javacp$.$anonfun$sinfos$17(Javacp.scala:233)
  at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:576)
  at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:574)
  at scala.collection.AbstractIterable.foreach(Iterable.scala:933)
  at scala.meta.internal.javacp.Javacp$.sinfos(Javacp.scala:225)
  at scala.meta.internal.javacp.Javacp$.$anonfun$sinfos$17(Javacp.scala:233)
  at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:576)
  at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:574)
  at scala.collection.AbstractIterable.foreach(Iterable.scala:933)
  at scala.meta.internal.javacp.Javacp$.sinfos(Javacp.scala:225)
  at scala.meta.internal.javacp.Javacp$.parse(Javacp.scala:26)
  at scala.meta.internal.metacp.ClassfileInfos$.fromClassNode(ClassfileInfos.scala:55)
  at scala.meta.internal.symtab.GlobalSymbolTable.loadSymbol(GlobalSymbolTable.scala:39)
  at scala.meta.internal.symtab.GlobalSymbolTable.info(GlobalSymbolTable.scala:70)
  ... 57 elided

scalameta/scalameta#3376

Seq(scala213, scala212).flatMap(sv => previousVersions(sv).map(prev => (sv, prev))) ++
Seq(scala213, scala212).map(sv => (sv, scala3))

all.filter {
case (_, v) if System.getProperty("java.version") == "21" =>
!Seq("2.12.16", "2.12.17", "2.13.10").contains(v)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

support for JDK21 was introduced in 2.12.18 and 2.13.11

@bjaglin bjaglin changed the title compatibility with JDK21 full support for JDK21 Nov 9, 2023
@bjaglin bjaglin changed the title full support for JDK21 full support for JDK21 via scalameta 4.8.13 Nov 10, 2023
@@ -28,7 +36,7 @@ object Dependencies {
val metaconfigV = "0.12.0"
val nailgunV = "0.9.1"
val scalaXmlV = "2.2.0"
val scalametaV = "4.8.12"
val scalametaV = "4.8.13"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bjaglin bjaglin marked this pull request as ready for review November 10, 2023 13:04
@bjaglin bjaglin merged commit 1d1d475 into scalacenter:main Nov 10, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant